<template>
  <div style="padding: 15px 10px;">
    <a-tabs v-model="currTab">
      <a-tab-pane key="1" tab="流程图">
        <a-card>
          <flow-chart-view :need-hide="currTab === '2'" />
        </a-card>
      </a-tab-pane>
      <a-tab-pane key="2" tab="节点列表">
        <a-card>
          <flow-chart-node-list />
        </a-card>
      </a-tab-pane>
    </a-tabs>
  </div>
</template>

<script lang="es6">
module.exports = asyncRequire([], (resolve, reject) => {
  resolve({
    name: 'FlowCard',
    components: {
      FlowChartView: load('./FlowChartView'),
      FlowChartNodeList: load('./FlowChartNodeList')
    },
    data () {
      return {
        currTab: '1',
      }
    },
    methods: {
      onClick (nodeId) {
        this.$message.success(nodeId);
      }
    }
  });
});
</script>

<style scoped>
  .task-group{
    margin: 0 48px;
  }
</style>
